wn=0;wo=0
for y=0,height-1,1 do
  for x=0,width-1,1 do
    wo=wn;r,g,b=get_rgb(x,y);wn=(((b*11)+(r*30)+(g*59))/100)
    set_rgb(x,y,0,0,wn)
    if wn>wo then
      set_rgb(x,y,0,wn,0)
      end
    if wn<wo then
      set_rgb(x,y,wn,0,0)
      end
    end
  progress(y/height)
  end
